package com.sc.ktapplication.common.util

import android.view.View
import android.widget.Toast
import com.google.android.material.snackbar.Snackbar
import com.sc.ktapplication.MyApp

object ToastUtil {

    fun showLong(info: String) {
        Toast.makeText(MyApp.instance.applicationContext, info, Toast.LENGTH_LONG).show()
    }

    fun showShort(info: String) {
        Toast.makeText(MyApp.instance.applicationContext, info, Toast.LENGTH_SHORT).show()
    }

    fun snackbarShort(view: View?, info: String?) {
        Snackbar.make(view!!, info!!, Snackbar.LENGTH_SHORT).show()
    }

    fun snackbarLong(view: View?, info: String?) {
        Snackbar.make(view!!, info!!, Snackbar.LENGTH_LONG).show()
    }
}
